﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head> 
<title>无标题页</title> 
<script type="text/javascript" src="../js/jquery.js"></script> 
<script type="text/javascript">
    //这个方法把ajax方法封装一下，方便调用。 
    function myajax() {
        $.ajax({
            type: 'get',
            url: 'test.aspx',
            data: '',
            dataType: 'html',
            success: callback
        });
    }
    //回调函数 
    function callback(data) {
        $('#response').append(data);
    }
    //onload()事件 
    $(function() {
        $('#confirm').click(myajax);
    }) 
</script> 
</head> 
<body> 
<div id="confirm"><button onclick="myajax" title="点击"></button></div> 
<div id="response">接收后台数据</div> 
</body> 
</html>